<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView();?>
</head>
<body class="view_index" id="view_index_Type">
<div class="view-index-nav">
        <h3><?php echo $module->name?></h3>
  <p class="tips">
        <?php echo $module->description?>
        </p>
</div>
<form class="view-index-form margin-10-20" method="post" action="<?php echo $this->context->getModelsActionUrl(['batch']);?>" enctype="multipart/form-data">
<table class="view-index-search mb-10" border="0" cellspacing="0" cellpadding="0" width="100%">

        <tr>
        <td class="search">
        <div class="div-search" style="margin:0px 0px; height:30px;">
        <div class="ftr">
        <button class="ui-btn ui-btn-primary mb-10" type="button" onclick="href('<?php echo $this->context->getModelsActionUrl(['create', 'type'=>$type]);?>')"><span class="icon-plus">+</span>添加模型</button>
        
        
        </div>
       
        <span class="view-index-batch">
        
        </span></div>
         
        </td>
        </tr>
</table>


<input type="hidden" class="input-text" id="_csrf" name="_csrf" value="<?php echo Yii::$app->request->csrfToken;?>">
<table class="view-index-list" border="0" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>

          <th width="40">ID</th>
                        <th>模型名称</th>
                        <th width="150">数据库表名</th>
                        <th width="150">接口配置</th>
                        <th width="150">主界面配置</th>
                        <th width="100">更新缓存</th>
                        <th width="100">自定义字段</th>
                        
            <th class="edit norightborder">操作</th>
        </tr>
    </thead>
    <tbody>
        <?php
    foreach($rows as $k=>$v){
    ?>
    <tr>
              
        <td><?php echo $v['modelid'];?></td>
        <td><a href="<?php echo $this->context->getModelsActionUrl(['submodel-index', 'modelid'=>$v['modelid']])?>"><?php echo $v['name'];?></a></td>
                
        <td><?php echo $v['tablename'];?></td>
        <td><a href="<?php echo $this->context->getModelsActionUrl(['api','modelid'=>$v['modelid']])?>" title="编辑" class="operation-update">接口配置</a> <a href="<?php echo $this->context->getModelsActionUrl(['api-document','modelid'=>$v['modelid']])?>" title="接口文档" class="operation-update">(接口文档)</a></td>
        <td><?php echo $v['tablename'];?></td>
        <td align="center"><a href="<?php echo $this->context->getModelsActionUrl(['update-cache', 'modelids'=>$v['modelid'], 'goback'=> 1])?>" title="更新缓存">更新缓存</a></td>
        <td><a href="<?php echo $this->context->getModelsActionUrl(['field', 'modelid'=>$v['modelid']])?>" title="自定义字段">自定义字段</a></td>   
        
                <td class="td-operation">
            <a href="<?php echo $this->context->getModelsActionUrl(['update','modelid'=>$v['modelid']])?>" title="编辑" class="operation-update">编辑</a> <a href="<?php echo $this->context->getModelsActionUrl(['delete','modelid'=>$v['modelid']])?>" title="删除" class="operation-delete">删除</a></td>
        <?php
}
?>    </tr>
        </tbody>
    
</table>
<table class="view-index-list" style="margin-top:0; border-top:0" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr style="background-color:#eee" class="batch">
<td width="100">
<td align="right">
<div class="pages ftr">
<?=$this->linkPager($pages)?>
</div>
</td>
</td>
</tr>  
</tbody>
</table>
<?php $this->FooterView();?>
</body>
</html>